add replace method to git.Commit#1124
Merged
Byron merged 1 commit intogitpython-developers:masterfrom Feb 17, 2021
Merged
Conversation
This adds a replace method to git.Commit. The replace method returns a copy of the Commit object with attributes replaced from keyword arguments. For example: >>> old = repo.head.commit >>> new = old.replace(message='This is a test') closes gitpython-developers#1123
826cf16 to
36811a2
Compare
larsks
added a commit
to larsks/git-snippets
that referenced
this pull request
Feb 16, 2021
larsks
added a commit
to larsks/git-snippets
that referenced
this pull request
Feb 16, 2021
use Commit.replace from gitpython-developers/GitPython#1124.
Member
|
Thanks so much, absolutely perfect work (at least as far as I can tell :)). I must admit that initially I was skeptical when reading the corresponding issue, but now that I see the implementation I couldn't find a reason not to have this capability. If you would like the next release to contain a dedicated and deserved entry in the changelog ( |
larsks
added a commit
to larsks/GitPython
that referenced
this pull request
Feb 17, 2021
- add a changelog entry for gitpython-developers#1124 - correct duplicate entry for 3.1.12 -> 3.1.13
This was referenced Mar 17, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a replace method to git.Commit. The replace method returns a
copy of the Commit object with attributes replaced from keyword
arguments. For example:
closes #1123